package wechat

import "crmeb-common/global"

// PayComponentOrder 组件订单表
type PayComponentOrder struct {
	global.BaseModel
	OrderNo string `json:"orderNo" gorm:"column=order_no;comment:订单号,商家自定义订单ID"`

	ComponentOrderId int64 `json:"componentOrderId" gorm:"column=component_order_id;comment:微信侧订单id "`

	Openid string `json:"openid" gorm:"column=openid;comment:用户的openid"`

	Path string `json:"path" gorm:"column=path;comment:商家小程序该订单的页面path，用于微信侧订单中心跳转"`

	Scene int32 `json:"scene" gorm:"column=scene;comment:下单时小程序的场景值"`

	OutUserId int32 `json:"outUserId" gorm:"column=out_user_id;comment:用户id"`

	PayMethod string `json:"payMethod" gorm:"column=pay_method;comment:支付方式，包括：微信支付,货到付款,其他"`

	PayMethodType int32 `json:"payMethodType" gorm:"column=pay_method_type;comment:支付方式，0，微信支付，1: 货到付款，99: 其他（默认0）"`

	PrepayId string `json:"prepayId" gorm:"column=prepay_id;comment:预支付ID"`

	PrepayTime string `json:"prepayTime" gorm:"column=prepay_time;comment:预付款时间（拿到prepay_id的时间）"`

	OrderPrice int64 `json:"orderPrice" gorm:"column=order_price;comment:该订单最终的金额（单位：分）"`

	Freight int64 `json:"freight" gorm:"column=freight;comment:运费（单位：分）"`

	DiscountedPrice int64 `json:"discountedPrice" gorm:"column=discounted_price;comment:优惠金额（单位：分）"`

	AdditionalPrice int64 `json:"additionalPrice" gorm:"column=additional_price;comment:附加金额（单位：分）"`

	AdditionalRemarks string `json:"additionalRemarks" gorm:"column=additional_remarks;comment:附加金额备注"`

	DeliveryType int32 `json:"deliveryType" gorm:"column=delivery_type;comment:发货类型:1: 正常快递, 2: 无需快递, 3: 线下配送, 4: 用户自提 （默认1）"`

	ReceiverName string `json:"receiverName" gorm:"column=receiver_name;comment:收件人姓名"`

	DetailedAddress string `json:"detailedAddress" gorm:"column=detailed_address;comment:详细收货地址信息"`

	TelNumber string `json:"telNumber" gorm:"column=tel_number;comment:收件人手机号码"`

	Country string `json:"country" gorm:"column=country;comment:国家"`

	Province string `json:"province" gorm:"column=province;comment:省份"`

	City string `json:"city" gorm:"column=city;comment:城市"`

	Town string `json:"town" gorm:"column=town;comment:乡镇"`

	Ticket string `json:"ticket" gorm:"column=ticket;comment:拉起收银台的ticket"`

	TicketExpireTime string `json:"ticketExpireTime" gorm:"column=ticket_expire_time;comment:ticket有效截止时间"`

	FinalPrice int64 `json:"finalPrice" gorm:"column=final_price;comment:订单最终价格（单位：分）"`

	Status int32 `json:"status" gorm:"column=status;comment:订单状态：10-待付款，11-收银台支付完成（自动流转，对商家来说和10同等对待即可），20-待发货，30-待收货，100-完成，200-全部商品售后之后，订单取消，250-用户主动取消/待付款超时取消/商家取消"`

	FinishAllDelivery int32 `json:"finishAllDelivery" gorm:"column=finish_all_delivery;comment:是否发货完成"`

	DeliveryList string `json:"deliveryList" gorm:"column=delivery_list;comment:快递数组"`

	TransactionId string `json:"transactionId" gorm:"column=transaction_id;comment:微信支付订单号"`

	TimeEnd string `json:"timeEnd" gorm:"column=time_end;comment:订单支付时间，格式为yyyyMMddHHmmss"`

	MerId int32 `json:"merId" gorm:"column=mer_id;comment:商户id"`
}
